package com.lagou.sqlSession;

import java.util.List;

/**
 * @author lubiao
 * @date 2021/4/2
 * @desc
 */
public interface SqlSession {

    //查询所有
    public <E> List<E> selectList(String statementId,Object... params) throws Exception;

    //根据条件查询单个
    public <T> T selectOne(String statementId,Object... params) throws Exception;


    //dao接口生成代理实现类
    public <T> T getMapper(Class<?> mapperClass);

    //新增一个对象
    public Integer add(String statementId,Object... params) throws Exception;

    //删除一个对象
    Integer delete(String statementId,Object... params) throws Exception;

    //修改一个对象
    public Integer update(String statementId,Object... params) throws Exception;

}
